/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package avl.sv.shared;

import avl.sv.shared.SlideReference;
import java.io.Serializable;
import java.util.ArrayList;
import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author benbryan
 */
public class SlideSet extends DefaultMutableTreeNode implements Serializable   {
    private final String slideSetName;   
    
    public SlideSet(String slideSetName) {
        this.slideSetName = slideSetName;
    }
    
    public String getSlideSetName() {
        return slideSetName;
    }

    @Override
    public String toString() {
        return slideSetName;
    }

    public ArrayList<SlideReference> getSlides() {
        if (children == null) {
            return new ArrayList<>();
        }
        ArrayList<SlideReference> slideSet = new ArrayList<>();
        for (Object r : children) {
            if (r instanceof SlideReference) {
                slideSet.add((SlideReference) r);
            }
        }

        return slideSet;
    }


}